pkgname=vim-ctrlp
pkgver=1.81
pkgrel=1
pkgdesc="Fuzzy file, buffer, mru, tag, etc finder."
arch=('any')
url="https://github.com/ctrlpvim/ctrlp.vim"
license=('custom:vim')
depends=('vim>=7.0')
optdepends=('ctags: for searching tags')
groups=('vim-plugins')
source=($pkgname-$pkgver.tar.gz::"https://github.com/ctrlpvim/ctrlp.vim/archive/$pkgver.tar.gz"
        LICENSE)
sha1sums=('e96c93d9d4b3b268ccbbc345b04af0740d1157fb'
          'be741035a33a75861fa14fcbd634d4174912c540')

package() {
	cd "${srcdir}/ctrlp.vim-$pkgver"

	installpath="${pkgdir}/usr/share/vim/vimfiles"

	install -d "$installpath/autoload/ctrlp/"
	install -Dm644 autoload/ctrlp/* "$installpath/autoload/ctrlp/"
	install -Dm644 autoload/ctrlp.vim "$installpath/autoload/ctrlp.vim"
	install -Dm644 doc/ctrlp.txt "$installpath/doc/ctrlp.txt"
	install -Dm644 plugin/ctrlp.vim "$installpath/plugin/ctrlp.vim"
	install -Dm644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
